home *** CD-ROM | disk | FTP | other *** search
- .key file/a,cmd/a,desc
- .def desc=t:file_id.diz
- .bra {
- .ket }
-
- ;ARGUMENT EXPLANATION:
- ; {file} = Filename with full path, no quotes included.
- ; {cmd} = Command from viewdiz (Read, Write, eXecute, Delete, Info, Edit).
- ; {desc} = Filename of description = t:file_id.diz
- ;
- ;VARIABLES:
- ; "xpkstatus" (local):
- ; boolean; 1 if {file} is xpk-packed (read only)
- ;
- ; "viewdiz/.minf" (global):
- ; Used by future prefs program and should be set when {cmd}=info.
- ; See documentation for details.
- ;
- ;WARNING:
- ; Using the C:Quit command can cause troubles, as it will quit ALL scripts
- ; in progress. Use LAB/SKIP instead.
-
- if {cmd} eq "read"
- ;Extract the description from {file} - Place it in {desc}. This will
- ;be called each time viewdiz detects this filetype. You should optimize
- ;this routine to obtain maximum speed.
- endif
-
- if {cmd} eq "write"
- ;Save description {desc} in {file}.
- endif
-
- if {cmd} eq "delete"
- ;Delete description from {file}. Will be executed when the user
- ;activates the KILL/S switch.
- endif
-
- if {cmd} eq "execute"
- ;Perform an action on {file} (unpack, view, read etc...) This function
- ;will be called each time the user presses the action-button, or if
- ;the EXECUTE/S switch is active.
- endif
-
- if {cmd} eq "edit"
- ;Here you may start an alternative description editor
- ;If nothing is stated, the env:viewdiz/editor.s
- ;script will be launched. Must not detach itself from CLI.
- endif
-
- if {cmd} eq "info"
- ;Set some info about this module. Alter only text in uppercase.
- setenv viewdiz/.minf "*"{file}*"" FLAGS ITEM DEFAULT PATTERN FILETYPE
- endif
- ;$VER: ViewDIZ-???.module ver.rev (dd.mm.yy) yourname
-